$(function() {
    var infomation_data = []; //所有数据
    var search_info_data = []; //查询按钮查出的数据
    var ginseng_data = []; //参保情况
    var ginseng_data2 = []; //医保个人情况
    var ginseng_data3 = []; //企业养老情况
    var ginseng_data4 = []; //机关养老情况
    var ginseng_data5 = []; //工伤情况
    var ginseng_data6 = []; //生育情况
    var ginseng_data7 = []; //失业情况
    var ginseng_data8 = []; //居保情况
    var ginseng_data9 = []; //参保情况
    var pay_data = []; //参保缴费情况
    var ginsengToPersion = []; //个人实际参保情况
    var ginsengToPersion2 = []; //医保个人情况
    var ginsengToPersion3 = []; //企业养老情况
    var ginsengToPersion4 = []; //机关养老情况
    var ginsengToPersion5 = []; //工伤情况
    var ginsengToPersion6 = []; //生育情况
    var ginsengToPersion7 = []; //失业情况
    var ginsengToPersion8 = []; //居保情况
    var ginsengToPersion9 = []; //参保情况
    var checkPopLayer = null; //弹窗对象
    var staticSurvivalValue = "死亡";
    var title = "精准扶贫对象信息"; //excel的标题
    var isSearchAll = true;
    var layerIdentity = $("#layer-identity"); //身份证
    var layerUserName = $("#layer-username"); //姓名
    var layerEmplo = $("#layer-employment"); //就业状态
    var layerWorkP = $("#layer-workPosition"); //工作单位
    var layerSex = $("#layer-sex"); //性别

    var layerIDType = $("#layer-IDType") //证件类型
    var layerNation = $("#layer-nation") //民族
    var layerBirthDay = $("#layer-birthDay") //出生日期
    var layerAdminCode = $("#layer-adminCode") //户口所在地行政区划代码
    var layerHouseNum = $("#layer-house-Num") //户口簿标号
    var layerFamilyNum = $("#layer-familyNum") //家庭标编号
    var layerZgPayState = $("#layer-zgPayState") //职工养老缴费状态
    var layerGsPayState = $("#layer-gsPayState") //工伤缴费状态
    var layerBirthPayState = $("#layer-birthPayState") //生育缴费状态
    var layerZgylPayState = $("#layer-zgylPayState") //职工医疗保缴费状态
    var layerUnemploPayState = $("#layer-unemploPayState") //失业缴费状态
    var layerJmylPayState = $("#layer-jmylPayState") //居民养老缴费状态
    var layerYmylPayState = $("#layer-ymylPayState") //居民医保缴费状态
    var layerJgPayState = $("#layer-jgPayState") //机保缴费状态
    var layerRetireFlag = $("#layer-retireFlag") //离退休标志
    var layerIssuingFlag = $("#layer-issuingFlag") //是否代发人员
    var layerUninsuredFlag = $("#layer-uninsuredFlag") //未参保原因
    var layerTurnFlag = $("#layer-turnFlag") //是否移交社区

    var layerPerIden = $("#layer-persional-identity"); //个人身份
    var layerCity = $("#layer-city"); //村镇/街道
    var layerCommu = $("#layui-community"); //社区
    var layerResiden = $("#layer-residence"); //户口所在地
    var layerLoca = $("#layer-location"); //常驻地
    var layerTell = $("#layer-tell"); //电话
    var layerTele = $("#layer-telephone"); //固定电话
    var layerReason = $("#layer-no-join-reason"); //未参保原因
    var layerSurState = $("#layer-survivalState"); //生存状态
    var layerDiff = $("#layui-diff-join"); //是否异地参保
    var layerMark = $("#layer-remark"); //备注*/

    //后面为了tab页新增的
    var minzu = $("#layer-tab-minzu");
    var hukou = $("#layer-tab-hukou");
    var wenhua = $("#layer-tab-wenhua");
    var mingcheng = $("#layer-tab-mingcheng");
    var bianhao = $("#layer-tab-bianhao");
    var zhiwu = $("#layer-tab-zhiwu");
    var shijian = $("#layer-tab-shijian");
    var gongling = $("#layer-tab-gongling");
    var zhongxin = $("#layer-tab-zhongxin");
    var zhanghao = $("#layer-tab-zhanghao");
    var diqu = $("#layer-tab-diqu");
    var youzheng = $("#layer-tab-youzheng");
    var tongxun = $("#layer-tab-tongxun");
    //贫困对象统计数据
    var statisticsData = [];

    //弹窗内下拉框数组长度
    var employddLength, sexLength, perIdenLength, cityLenth, commuLength, reasonLength, surLength, diffLength;
    //弹窗内下拉输入框对象
    var employIn, sexIn, perIdenIn, cityIn, commuIn, reasonIn, surIn, diffIn;
    statisticsData = [{
            id: '001',
            cityName: '雪峰镇',
            shouldParticiple: 166,
            notParticiple: 80
        },
        {
            id: '002',
            cityName: '盖山镇',
            shouldParticiple: 134,
            notParticiple: 40
        },
        {
            id: '003',
            cityName: '仓山镇',
            shouldParticiple: 156,
            notParticiple: 49
        },
        {
            id: '004',
            cityName: '金山镇',
            shouldParticiple: 123,
            notParticiple: 33
        }
    ];

    //测试数据
    infomation_data = [{
        town: '雪峰镇',
        sysCode: '449900_01',
        idenifyType: '居民身份证',
        districtCode: '6530',
        adminCode: '530000000000',
        name: '贤心',
        birthDate: '1993-8-29',
        noJoinReasion: '单位未参保',
        idenifyCode: '340111199807125218',
        isEmploy: '是',
        employState: '已就业',
        sex: '男',
        zgPayState: '已参保',
        gsPayState: '已参保',
        birthPayState: '已参保',
        zgylPayState: '已参保',
        unemploPayState: '已参保',
        jmylPayState: '已参保',
        ymylPayState: '已参保',
        jgPayState: '已参保',
        survival: '生存',
        poorProper: '五保户贫困',
        residence: '天河区车陂街中山大道西55号华师大南区12栋402房',
        cxJoinState: '已参保',
        zgJoinState: '未参保',
        jgJoinState: '未参保',
        czJoinState: '未参保',
        xnhJoinState: '已参保',
        czJoinState2: '已参保',
        tell: '1890024260',
        telephone: '',
        address: '车坡街',
        village: '美好社区',
        houseNum: '402号',
        workPosition: '富力中心',
        diffJoin: '是',
        persionIden: '军人',
        location: '天河区车坡街中山大道',
        remark: '',
        id: 203,
        minzu: '汉',
        hukou: '非农业户口（城镇）',
        wenhua: '大学本科',
        mingcheng: '20080201',
        bianhao: '',
        zhiwu: '档案管理干部',
        shijian: '19940504',
        gongling: '10年',
        zhanghao: '',
        diqu: '',
        zhongxin: '',
        youzheng: 510000,
        tongxun: '天河区车陂街中山大道西55号华师大南区12栋402房'
    }, {
        town: '盖山镇',
        sysCode: '449900_02',
        idenifyType: '港澳台居民居住证',
        districtCode: '6530',
        adminCode: '530000000000',
        name: '陈舒珠',
        birthDate: '1992-1-29',
        noJoinReasion: '个人未参保',
        idenifyCode: '440106189811128213',
        isEmploy: '否',
        employState: '已就业',
        sex: '女',
        zgPayState: '已参保',
        gsPayState: '已参保',
        birthPayState: '已参保',
        zgylPayState: '已参保',
        unemploPayState: '已参保',
        jmylPayState: '已参保',
        ymylPayState: '已参保',
        jgPayState: '已参保',
        survival: '死亡',
        poorProper: '无劳动能力户',
        residence: '天河区车陂街金穗路70号之二2906房',
        cxJoinState: '已参保',
        zgJoinState: '未参保',
        jgJoinState: '未参保',
        czJoinState: '未参保',
        xnhJoinState: '已参保',
        czJoinState2: '已参保',
        tell: '1890024260',
        telephone: '0591-5352346',
        address: '车坡街',
        village: '西岸社区',
        houseNum: '2906号',
        workPosition: '富力中心',
        diffJoin: '是',
        persionIden: '职工',
        location: '天河区车陂街金穗路',
        remark: '外籍华人',
        id: 204,
        minzu: '汉',
        hukou: '非农业户口（城镇）',
        wenhua: '大学专科',
        mingcheng: '20110120',
        bianhao: '',
        zhiwu: '财务管理',
        shijian: '20160407',
        gongling: '2年',
        zhanghao: 6212291406051155847,
        diqu: '',
        zhongxin: '',
        youzheng: 510000,
        tongxun: '天河区车陂街金穗路70号之二2906房'

    }, {
        town: '仓山镇',
        sysCode: '449900_02',
        idenifyType: '中国人民解放军军官证',
        districtCode: '6540',
        adminCode: '530000000000',
        name: '李四',
        birthDate: '1993-8-29',
        noJoinReasion: '单位未参保',
        idenifyCode: '510102xxxxxxxx6317',
        isEmploy: '是',
        employState: '已就业',
        sex: '男',
        zgPayState: '已参保',
        gsPayState: '已参保',
        birthPayState: '已参保',
        zgylPayState: '已参保',
        unemploPayState: '已参保',
        jmylPayState: '已参保',
        ymylPayState: '已参保',
        jgPayState: '已参保',
        survival: '死亡',
        poorProper: '残疾户',
        residence: '天河区车陂街黄埔大道西601号暨大苏州苑13栋203房',
        cxJoinState: '已参保',
        zgJoinState: '已参保',
        jgJoinState: '未参保',
        czJoinState: '未参保',
        xnhJoinState: '未参保',
        czJoinState2: '已参保',
        tell: '1890024260',
        telephone: '0591-5352346',
        address: '车坡街',
        village: '美好社区',
        houseNum: '203号',
        workPosition: '富力中心',
        diffJoin: '是',
        persionIden: '学生',
        remark: '',
        location: '天河区车坡街道黄埔大道',
        id: 205

    }, {
        town: '金山镇',
        sysCode: '449900_02',
        idenifyType: '中国人民解放军军官证',
        districtCode: '6540',
        adminCode: '530000000000',
        name: '王五',
        birthDate: '1993-8-29',
        noJoinReasion: '单位未参保',
        idenifyCode: '440106xxxxxxxx1817',
        isEmploy: '是',
        employState: '已就业',
        sex: '男',
        zgPayState: '已参保',
        gsPayState: '已参保',
        birthPayState: '已参保',
        zgylPayState: '已参保',
        unemploPayState: '已参保',
        jmylPayState: '已参保',
        ymylPayState: '已参保',
        jgPayState: '已参保',
        survival: '死亡',
        poorProper: '残疾户',
        residence: '天河区车陂街黄埔大道西601号暨大羊城苑13栋504房',
        cxJoinState: '已参保',
        zgJoinState: '未参保',
        jgJoinState: '未参保',
        czJoinState: '未参保',
        xnhJoinState: '已参保',
        czJoinState2: '已参保',
        tell: '1890024260',
        telephone: '',
        address: '车坡街',
        village: '美好社区',
        houseNum: '202号',
        workPosition: '富力中心',
        diffJoin: '是',
        persionIden: '学生',
        remark: '',
        location: '天河区车坡街黄埔大道',
        id: 206

    }, {
        town: '雪峰镇',
        sysCode: '449900_02',
        idenifyType: '中国人民解放军军官证',
        districtCode: '6540',
        adminCode: '530000000000',
        name: '贤心',
        birthDate: '1993-8-29',
        noJoinReasion: '单位未参保',
        idenifyCode: '430111xxxxxxxx4811',
        isEmploy: '是',
        employState: '已就业',
        sex: '男',
        zgPayState: '已参保',
        gsPayState: '已参保',
        birthPayState: '已参保',
        zgylPayState: '已参保',
        unemploPayState: '已参保',
        jmylPayState: '已参保',
        ymylPayState: '已参保',
        jgPayState: '已参保',
        survival: '生存',
        poorProper: '残疾户',
        residence: '天河区车陂街枫叶路8号之四2505房',
        cxJoinState: '已参保',
        zgJoinState: '未参保',
        jgJoinState: '未参保',
        czJoinState: '未参保',
        xnhJoinState: '已参保',
        czJoinState2: '已参保',
        tell: '1890024260',
        telephone: '0591-5352346',
        address: '车坡街',
        village: '美好社区',
        houseNum: '2505号',
        workPosition: '人才市场',
        diffJoin: '否',
        remark: '',
        persionIden: '教师',
        location: '天河区车陂街枫叶路',
        id: 207

    }, {
        town: '雪峰镇',
        sysCode: '449900_02',
        idenifyType: '中国人民解放军军官证',
        districtCode: '6540',
        adminCode: '530000000000',
        name: '贤心',
        birthDate: '1993-8-29',
        noJoinReasion: '个人未参保',
        idenifyCode: '441522xxxxxxxx2765',
        isEmploy: '是',
        employState: '未就业',
        sex: '男',
        zgPayState: '已参保',
        gsPayState: '已参保',
        birthPayState: '已参保',
        zgylPayState: '已参保',
        unemploPayState: '已参保',
        jmylPayState: '已参保',
        ymylPayState: '已参保',
        jgPayState: '已参保',
        survival: '生存',
        poorProper: '残疾户',
        residence: '天河区车陂街美景街62号604房',
        cxJoinState: '已参保',
        zgJoinState: '未参保',
        jgJoinState: '未参保',
        czJoinState: '未参保',
        xnhJoinState: '已参保',
        czJoinState2: '已参保',
        tell: '1890024260',
        telephone: '0591-5352346',
        address: '车坡街',
        village: '美好社区',
        houseNum: '604号',
        workPosition: '富力中心',
        diffJoin: '是',
        remark: '',
        location: '天河区车陂街美景街',
        persionIden: '学生',
        id: 208

    }, {
        town: '雪峰镇',
        sysCode: '449900_02',
        idenifyType: '中国人民解放军军官证',
        districtCode: '6540',
        adminCode: '530000000000',
        name: '小红',
        birthDate: '1993-8-29',
        noJoinReasion: '单位未参保',
        idenifyCode: '460003xxxxxxxx7814',
        isEmploy: '是',
        employState: '已就业',
        sex: '男',
        zgPayState: '已参保',
        gsPayState: '已参保',
        birthPayState: '已参保',
        zgylPayState: '已参保',
        unemploPayState: '已参保',
        jmylPayState: '已参保',
        ymylPayState: '已参保',
        jgPayState: '已参保',
        survival: '死亡',
        poorProper: '残疾户',
        residence: '天河区车陂街花生寮二巷6号',
        cxJoinState: '已参保',
        zgJoinState: '未参保',
        jgJoinState: '未参保',
        czJoinState: '未参保',
        xnhJoinState: '已参保',
        czJoinState2: '已参保',
        tell: '1890024260',
        telephone: '0591-5352346',
        address: '车坡街',
        village: '美好社区',
        houseNum: '6号',
        workPosition: '富力中心',
        diffJoin: '是',
        remark: '',
        location: '天河区车陂街花生寮',
        persionIden: '学生',
        id: 209

    }, {
        town: '雪峰镇',
        sysCode: '449900_02',
        idenifyType: '中国人民解放军军官证',
        districtCode: '6540',
        adminCode: '530000000000',
        name: '小明',
        birthDate: '1993-8-29',
        noJoinReasion: '单位未参保',
        idenifyCode: '440102xxxxxxxx7018',
        isEmploy: '是',
        employState: '未就业',
        sex: '男',
        zgPayState: '已参保',
        gsPayState: '已参保',
        birthPayState: '已参保',
        zgylPayState: '已参保',
        unemploPayState: '已参保',
        jmylPayState: '已参保',
        ymylPayState: '已参保',
        jgPayState: '已参保',
        survival: '生存',
        poorProper: '残疾户',
        residence: '天河区车陂街龙口横街28号2栋503房',
        cxJoinState: '已参保',
        zgJoinState: '未参保',
        jgJoinState: '未参保',
        czJoinState: '未参保',
        xnhJoinState: '已参保',
        czJoinState2: '未参保',
        tell: '1890024260',
        telephone: '',
        address: '车坡街',
        village: '美好社区',
        houseNum: '202号',
        workPosition: '富力中心',
        diffJoin: '是',
        persionIden: '员工',
        location: '天河区车陂街龙口横街',
        remark: '',
        id: 210

    }, {
        town: '雪峰镇',
        sysCode: '449900_02',
        idenifyType: '中国人民解放军军官证',
        districtCode: '6540',
        adminCode: '530000000000',
        name: '晓东',
        birthDate: '1993-8-29',
        noJoinReasion: '单位未参保',
        idenifyCode: '440582xxxxxxxx5038',
        isEmploy: '是',
        employState: '已就业',
        sex: '男',
        zgPayState: '已参保',
        gsPayState: '已参保',
        birthPayState: '已参保',
        zgylPayState: '已参保',
        unemploPayState: '已参保',
        jmylPayState: '已参保',
        ymylPayState: '已参保',
        jgPayState: '已参保',
        survival: '死亡',
        poorProper: '残疾户',
        residence: '天河区车陂街天河南一路18号',
        cxJoinState: '已参保',
        zgJoinState: '未参保',
        jgJoinState: '未参保',
        czJoinState: '未参保',
        xnhJoinState: '已参保',
        czJoinState2: '已参保',
        tell: '1890024260',
        telephone: '0591-5352346',
        address: '车坡街',
        village: '美好社区',
        houseNum: '18号',
        workPosition: '富力中心',
        diffJoin: '是',
        persionIden: '教师',
        remark: '',
        location: '天河区车陂街天河南一路',
        id: 211

    }, {
        town: '雪峰镇',
        sysCode: '449900_02',
        idenifyType: '中国人民解放军军官证',
        districtCode: '6540',
        adminCode: '530000000000',
        name: '王馨萱',
        birthDate: '1993-8-29',
        noJoinReasion: '个人未参保',
        idenifyCode: '441422xxxxxxxx5617',
        isEmploy: '是',
        employState: '未就业',
        sex: '男',
        zgPayState: '已参保',
        gsPayState: '已参保',
        birthPayState: '已参保',
        zgylPayState: '已参保',
        unemploPayState: '已参保',
        jmylPayState: '已参保',
        ymylPayState: '已参保',
        jgPayState: '已参保',
        survival: '死亡',
        poorProper: '残疾户',
        residence: '天河区车陂街五山路381号华工2013级电信学院',
        cxJoinState: '已参保',
        zgJoinState: '未参保',
        jgJoinState: '未参保',
        czJoinState: '未参保',
        xnhJoinState: '已参保',
        czJoinState2: '已参保',
        tell: '1890024260',
        telephone: '',
        address: '车坡街',
        village: '美好社区',
        houseNum: '45号',
        workPosition: '富力中心',
        diffJoin: '是',
        persionIden: '残疾',
        remark: '',
        location: '天河区车陂街五山路381号',
        id: 212

    }, {
        town: '雪峰镇',
        sysCode: '449900_02',
        idenifyType: '中国人民解放军军官证',
        districtCode: '6540',
        adminCode: '530000000000',
        name: '贤心',
        birthDate: '1993-8-29',
        noJoinReasion: '单位未参保',
        idenifyCode: '440106xxxxxxxx4021',
        isEmploy: '是',
        employState: '已就业',
        sex: '男',
        zgPayState: '已参保',
        gsPayState: '已参保',
        birthPayState: '已参保',
        zgylPayState: '已参保',
        unemploPayState: '已参保',
        jmylPayState: '已参保',
        ymylPayState: '已参保',
        jgPayState: '已参保',
        survival: '死亡',
        poorProper: '残疾户',
        residence: '天河区车陂街华景街39号之五101房',
        cxJoinState: '已参保',
        zgJoinState: '未参保',
        jgJoinState: '未参保',
        czJoinState: '未参保',
        xnhJoinState: '已参保',
        czJoinState2: '已参保',
        tell: '1890024260',
        telephone: '0591-5352346',
        address: '车坡街',
        village: '美好社区',
        houseNum: '101号',
        workPosition: '富力中心',
        diffJoin: '是',
        remark: '',
        persionIden: '军人',
        location: '天河区车陂街华景街',
        id: 213
    }, {
        town: '雪峰镇',
        sysCode: '449900_02',
        idenifyType: '中国人民解放军军官证',
        districtCode: '6540',
        adminCode: '530000000000',
        name: '贤心',
        birthDate: '1993-8-29',
        noJoinReasion: '个人未参保',
        idenifyCode: '440106xxxxxxxx5923',
        isEmploy: '是',
        employState: '已就业',
        sex: '男',
        zgPayState: '已参保',
        gsPayState: '已参保',
        birthPayState: '已参保',
        zgylPayState: '已参保',
        unemploPayState: '已参保',
        jmylPayState: '已参保',
        ymylPayState: '已参保',
        jgPayState: '已参保',
        survival: '生存',
        poorProper: '残疾户',
        residence: '天河区车陂街棠下达善大街8巷3号',
        cxJoinState: '已参保',
        zgJoinState: '未参保',
        jgJoinState: '未参保',
        czJoinState: '未参保',
        xnhJoinState: '已参保',
        czJoinState2: '已参保',
        tell: '1890024260',
        telephone: '0591-5352346',
        address: '车坡街',
        village: '美好社区',
        houseNum: '3号',
        workPosition: '富力中心',
        diffJoin: '是',
        remark: '',
        persionIden: '学生',
        location: '天河区车陂街棠下达善大街',
        id: 214
    }];
    ginseng_data = [{
            id: 203,
            typeList: [{
                type: '城镇企业职工养老保险',
                place: '',
                case: '未参保',
                timeIn: '',
                payState: '未缴费',
                treatState: '',
                ifCheck: false
            }, {
                type: '机关事业单位养老保险',
                place: '',
                case: '未参保',
                timeIn: '',
                payState: '未缴费',
                treatState: '',
                ifCheck: false
            }, {
                type: '城乡居民养老保险',
                place: '',
                case: '未参保',
                timeIn: '',
                payState: '终止缴费',
                treatState: '暂停发放',
                ifCheck: false
            }, {
                type: '城镇职工基本医疗保险',
                place: '',
                case: '未参保',
                timeIn: '',
                payState: '未缴费',
                treatState: '',
                ifCheck: false
            }, {
                type: '城镇居民医疗保险',
                place: '天河区车坡街',
                case: '已参保',
                timeIn: '6',
                payState: '未缴费',
                treatState: '暂停发放',
                ifCheck: false
            }, {
                type: '新型农村合作医疗保险',
                place: '',
                case: '未参保',
                timeIn: '',
                payState: '未缴费',
                treatState: '',
                ifCheck: false
            }, {
                type: '领取退（离）休金保险',
                place: '',
                case: '未参保',
                timeIn: '',
                payState: '未缴费',
                treatState: '',
                ifCheck: false
            }]
        },
        {
            id: 204,
            typeList: [{
                type: '城镇企业职工养老保险',
                place: '天河区车坡街',
                case: '已参保',
                timeIn: '1',
                payState: '未缴费',
                treatState: '',
                ifCheck: true
            }, {
                type: '机关事业单位养老保险',
                place: '天河区车坡街',
                case: '已参保',
                timeIn: '3',
                payState: '未缴费',
                treatState: '暂停发放',
                ifCheck: true
            }, {
                type: '城乡居民养老保险',
                place: '天河区美好社区',
                case: '已参保',
                timeIn: '1',
                payState: '未缴费',
                treatState: '暂停发放',
                ifCheck: true
            }, {
                type: '城镇职工基本医疗保险',
                place: '',
                case: '未参保',
                timeIn: '',
                payState: '未缴费',
                treatState: '',
                ifCheck: false
            }, {
                type: '城镇居民医疗保险',
                place: '',
                case: '未参保',
                timeIn: '',
                payState: '未缴费',
                treatState: '',
                ifCheck: true
            }, {
                type: '新型农村合作医疗保险',
                place: '',
                case: '未参保',
                timeIn: '',
                payState: '未缴费',
                treatState: '',
                ifCheck: false
            }, {
                type: '领取退（离）休金保险',
                place: '',
                case: '未参保',
                timeIn: '',
                payState: '未缴费',
                treatState: '终止发放',
                ifCheck: true
            }]
        }
    ];
    ginseng_data2 = [{
            id: 203,
            typeList: [{
                type: '2018-11',
                place: '4931',
                case: '345.17',
                timeIn: '98.62',
                payState: '443.79',
                treatState: '2018-12',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-10',
                place: '4931',
                case: '345.17',
                timeIn: '98.62',
                payState: '443.79',
                treatState: '2018-11',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-09',
                place: '4931',
                case: '345.17',
                timeIn: '98.62',
                payState: '443.79',
                treatState: '2018-10',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-08',
                place: '4931',
                case: '345.17',
                timeIn: '98.62',
                payState: '443.79',
                treatState: '2018-09',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-07',
                place: '4931',
                case: '345.17',
                timeIn: '98.62',
                payState: '443.79',
                treatState: '2018-08',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-06',
                place: '4931',
                case: '345.17',
                timeIn: '98.62',
                payState: '443.79',
                treatState: '2018-07',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-05',
                place: '4931',
                case: '345.17',
                timeIn: '98.62',
                payState: '443.79',
                treatState: '2018-04',
                ssq: '天河区',
                ifCheck: false
            }]
        },
        {
            id: 204,
            typeList: [{
                type: '2018-11',
                place: '4931',
                case: '345.17',
                timeIn: '98.62',
                payState: '443.79',
                treatState: '2018-12',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-10',
                place: '4931',
                case: '345.17',
                timeIn: '98.62',
                payState: '443.79',
                treatState: '2018-11',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-09',
                place: '4931',
                case: '345.17',
                timeIn: '98.62',
                payState: '443.79',
                treatState: '2018-10',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-08',
                place: '4931',
                case: '345.17',
                timeIn: '98.62',
                payState: '443.79',
                treatState: '2018-09',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-07',
                place: '4931',
                case: '345.17',
                timeIn: '98.62',
                payState: '443.79',
                treatState: '2018-08',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-06',
                place: '4931',
                case: '345.17',
                timeIn: '98.62',
                payState: '443.79',
                treatState: '2018-07',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-05',
                place: '4931',
                case: '345.17',
                timeIn: '98.62',
                payState: '443.79',
                treatState: '2018-04',
                ssq: '天河区',
                ifCheck: false
            }]
        }
    ];
    ginseng_data3 = [{
            id: 203,
            typeList: [{
                type: '2018-11',
                place: '4931',
                case: '690.34',
                timeIn: '394.48',
                payState: '1084.82',
                treatState: '2018-12',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-10',
                place: '4931',
                case: '690.34',
                timeIn: '394.48',
                payState: '1084.82',
                treatState: '2018-11',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-09',
                place: '4931',
                case: '690.34',
                timeIn: '394.48',
                payState: '1084.82',
                treatState: '2018-10',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-08',
                place: '4931',
                case: '690.34',
                timeIn: '394.48',
                payState: '1084.82',
                treatState: '2018-09',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-07',
                place: '4931',
                case: '690.34',
                timeIn: '394.48',
                payState: '1084.82',
                treatState: '2018-08',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-06',
                place: '4931',
                case: '690.34',
                timeIn: '394.48',
                payState: '1084.82',
                treatState: '2018-07',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-05',
                place: '4931',
                case: '690.34',
                timeIn: '394.48',
                payState: '1084.82',
                treatState: '2018-04',
                ssq: '天河区',
                ifCheck: false
            }]
        },
        {
            id: 204,
            typeList: [{
                type: '2018-11',
                place: '4931',
                case: '690.34',
                timeIn: '394.48',
                payState: '1084.82',
                treatState: '2018-12',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-10',
                place: '4931',
                case: '690.34',
                timeIn: '394.48',
                payState: '1084.82',
                treatState: '2018-11',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-09',
                place: '4931',
                case: '690.34',
                timeIn: '394.48',
                payState: '1084.82',
                treatState: '2018-10',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-08',
                place: '4931',
                case: '690.34',
                timeIn: '394.48',
                payState: '1084.82',
                treatState: '2018-09',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-07',
                place: '4931',
                case: '690.34',
                timeIn: '394.48',
                payState: '1084.82',
                treatState: '2018-08',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-06',
                place: '4931',
                case: '690.34',
                timeIn: '394.48',
                payState: '1084.82',
                treatState: '2018-07',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-05',
                place: '4931',
                case: '690.34',
                timeIn: '394.48',
                payState: '1084.82',
                treatState: '2018-04',
                ssq: '天河区',
                ifCheck: false
            }]
        }
    ];
    ginseng_data4 = [{
            id: 203,
            typeList: [{
                type: '2018-11',
                place: '4931',
                case: '394.48',
                payState: '891.72',
                treatState: '2018-12',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-10',
                place: '4931',
                case: '394.48',
                payState: '891.72',
                treatState: '2018-11',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-09',
                place: '4931',
                case: '394.48',
                payState: '891.72',
                treatState: '2018-10',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-08',
                place: '4931',
                case: '394.48',
                payState: '891.72',
                treatState: '2018-09',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-07',
                place: '4931',
                case: '394.48',
                payState: '891.72',
                treatState: '2018-08',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-06',
                place: '4931',
                case: '394.48',
                payState: '891.72',
                treatState: '2018-07',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-05',
                place: '4931',
                case: '394.48',
                payState: '891.72',
                treatState: '2018-04',
                ssq: '天河区',
                ifCheck: false
            }]
        },
        {
            id: 204,
            typeList: [{
                type: '2018-11',
                place: '4931',
                case: '394.48',
                payState: '891.72',
                treatState: '2018-12',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-10',
                place: '4931',
                case: '394.48',
                payState: '891.72',
                treatState: '2018-11',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-09',
                place: '4931',
                case: '394.48',
                payState: '891.72',
                treatState: '2018-10',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-08',
                place: '4931',
                case: '394.48',
                payState: '891.72',
                treatState: '2018-09',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-07',
                place: '4931',
                case: '394.48',
                payState: '891.72',
                treatState: '2018-08',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-06',
                place: '4931',
                case: '394.48',
                payState: '891.72',
                treatState: '2018-07',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-05',
                place: '4931',
                case: '394.48',
                payState: '891.72',
                treatState: '2018-04',
                ssq: '天河区',
                ifCheck: false
            }]
        }
    ];
    //工伤
    ginseng_data5 = [{
            id: 203,
            typeList: [{
                type: '2018-11',
                place: '4931',
                case: '9.86',
                timeIn: '0',
                payState: '0',
                treatState: '2018-12',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-10',
                place: '4931',
                case: '9.86',
                timeIn: '0',
                payState: '0',
                treatState: '2018-11',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-09',
                place: '4931',
                case: '9.86',
                timeIn: '0',
                payState: '0',
                treatState: '2018-10',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-08',
                place: '4931',
                case: '9.86',
                timeIn: '0',
                payState: '0',
                treatState: '2018-09',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-07',
                place: '4931',
                case: '9.86',
                timeIn: '0',
                payState: '0',
                treatState: '2018-08',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-06',
                place: '4931',
                case: '9.86',
                timeIn: '0',
                payState: '0',
                treatState: '2018-07',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-05',
                place: '4931',
                case: '9.86',
                timeIn: '0',
                payState: '0',
                treatState: '2018-04',
                ssq: '天河区',
                ifCheck: false
            }]
        },
        {
            id: 204,
            typeList: [{
                type: '2018-11',
                place: '4931',
                case: '9.86',
                timeIn: '0',
                payState: '0',
                treatState: '2018-12',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-10',
                place: '4931',
                case: '9.86',
                timeIn: '0',
                payState: '0',
                treatState: '2018-11',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-09',
                place: '4931',
                case: '9.86',
                timeIn: '0',
                payState: '0',
                treatState: '2018-10',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-08',
                place: '4931',
                case: '9.86',
                timeIn: '0',
                payState: '0',
                treatState: '2018-09',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-07',
                place: '4931',
                case: '9.86',
                timeIn: '0',
                payState: '0',
                treatState: '2018-08',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-06',
                place: '4931',
                case: '9.86',
                timeIn: '0',
                payState: '0',
                treatState: '2018-07',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-05',
                place: '4931',
                case: '9.86',
                timeIn: '0',
                payState: '0',
                treatState: '2018-04',
                ssq: '天河区',
                ifCheck: false
            }]
        }
    ];
    //生育
    ginseng_data6 = [{
            id: 203,
            typeList: [{
                type: '2018-11',
                place: '4931',
                case: '41.91',
                timeIn: '0',
                payState: '0',
                treatState: '2018-12',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-10',
                place: '4931',
                case: '41.91',
                timeIn: '0',
                payState: '0',
                treatState: '2018-11',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-09',
                place: '4931',
                case: '41.91',
                timeIn: '0',
                payState: '0',
                treatState: '2018-10',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-08',
                place: '4931',
                case: '41.91',
                timeIn: '0',
                payState: '0',
                treatState: '2018-09',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-07',
                place: '4931',
                case: '41.91',
                timeIn: '0',
                payState: '0',
                treatState: '2018-08',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-06',
                place: '4931',
                case: '41.91',
                timeIn: '0',
                payState: '0',
                treatState: '2018-07',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-05',
                place: '4931',
                case: '41.91',
                timeIn: '0',
                payState: '0',
                treatState: '2018-06',
                ssq: '天河区',
                ifCheck: false
            }]
        },
        {
            id: 204,
            typeList: [{
                type: '2018-11',
                place: '4931',
                case: '41.91',
                timeIn: '0',
                payState: '0',
                treatState: '2018-12',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-10',
                place: '4931',
                case: '41.91',
                timeIn: '0',
                payState: '0',
                treatState: '2018-11',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-09',
                place: '4931',
                case: '41.91',
                timeIn: '0',
                payState: '0',
                treatState: '2018-10',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-08',
                place: '4931',
                case: '41.91',
                timeIn: '0',
                payState: '0',
                treatState: '2018-09',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-07',
                place: '4931',
                case: '41.91',
                timeIn: '0',
                payState: '0',
                treatState: '2018-08',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-06',
                place: '4931',
                case: '41.91',
                timeIn: '0',
                payState: '0',
                treatState: '2018-07',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-05',
                place: '4931',
                case: '41.91',
                timeIn: '0',
                payState: '0',
                treatState: '2018-06',
                ssq: '天河区',
                ifCheck: false
            }]
        }
    ];
    //失业
    ginseng_data7 = [{
            id: 203,
            typeList: [{
                type: '2018-11',
                place: '4931',
                case: '39.45',
                timeIn: '9.86',
                payState: '0',
                treatState: '2018-12',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-10',
                place: '4931',
                case: '39.45',
                timeIn: '9.86',
                payState: '0',
                treatState: '2018-11',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-09',
                place: '4931',
                case: '39.45',
                timeIn: '9.86',
                payState: '0',
                treatState: '2018-10',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-08',
                place: '4931',
                case: '39.45',
                timeIn: '9.86',
                payState: '0',
                treatState: '2018-09',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-07',
                place: '4931',
                case: '39.45',
                timeIn: '9.86',
                payState: '0',
                treatState: '2018-08',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-06',
                place: '4931',
                case: '39.45',
                timeIn: '9.86',
                payState: '0',
                treatState: '2018-07',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-05',
                place: '4931',
                case: '39.45',
                timeIn: '9.86',
                payState: '0',
                treatState: '2018-06',
                ssq: '天河区',
                ifCheck: false
            }]
        },
        {
            id: 204,
            typeList: [{
                type: '2018-11',
                place: '4931',
                case: '39.45',
                timeIn: '9.86',
                payState: '0',
                treatState: '2018-12',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-10',
                place: '4931',
                case: '39.45',
                timeIn: '9.86',
                payState: '0',
                treatState: '2018-11',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-09',
                place: '4931',
                case: '39.45',
                timeIn: '9.86',
                payState: '0',
                treatState: '2018-10',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-08',
                place: '4931',
                case: '39.45',
                timeIn: '9.86',
                payState: '0',
                treatState: '2018-09',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-07',
                place: '4931',
                case: '39.45',
                timeIn: '9.86',
                payState: '0',
                treatState: '2018-08',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-06',
                place: '4931',
                case: '39.45',
                timeIn: '9.86',
                payState: '0',
                treatState: '2018-07',
                ssq: '天河区',
                ifCheck: false
            }, {
                type: '2018-05',
                place: '4931',
                case: '39.45',
                timeIn: '9.86',
                payState: '0',
                treatState: '2018-06',
                ssq: '天河区',
                ifCheck: false
            }]
        }
    ];
    ginseng_data8 = [{
            id: 203,
            typeList: [{
                type: '4453810822',
                place: '201812',
                case: '100',
                timeIn: '2018',
                payState: '2018',
                treatState: '非趸交',
                ssq: '12',
                ifCheck: false
            }, {
                type: '4453810822',
                place: '201712',
                case: '100',
                timeIn: '2017',
                payState: '2017',
                treatState: '非趸交',
                ssq: '12',
                ifCheck: false
            }, {
                type: '4453810822',
                place: '201612',
                case: '100',
                timeIn: '2016',
                payState: '2016',
                treatState: '非趸交',
                ssq: '12',
                ifCheck: false
            }, {
                type: '4453810822',
                place: '201512',
                case: '100',
                timeIn: '2015',
                payState: '2015',
                treatState: '非趸交',
                ssq: '12',
                ifCheck: false
            }, {
                type: '4453810822',
                place: '201812',
                case: '100',
                timeIn: '2018',
                payState: '2018',
                treatState: '非趸交',
                ssq: '12',
                ifCheck: false
            }, {
                type: '4453810822',
                place: '201412',
                case: '100',
                timeIn: '2014',
                payState: '2014',
                treatState: '非趸交',
                ssq: '12',
                ifCheck: false
            }, {
                type: '4453810822',
                place: '201312',
                case: '100',
                timeIn: '2013',
                payState: '2013',
                treatState: '非趸交',
                ssq: '12',
                ifCheck: false
            }]
        },
        {
            id: 204,
            typeList: [{
                type: '4453810822',
                place: '201812',
                case: '100',
                timeIn: '2018',
                payState: '2018',
                treatState: '非趸交',
                ssq: '12',
                ifCheck: false
            }, {
                type: '4453810822',
                place: '201712',
                case: '100',
                timeIn: '2017',
                payState: '2017',
                treatState: '非趸交',
                ssq: '12',
                ifCheck: false
            }, {
                type: '4453810822',
                place: '201612',
                case: '100',
                timeIn: '2016',
                payState: '2016',
                treatState: '非趸交',
                ssq: '12',
                ifCheck: false
            }, {
                type: '4453810822',
                place: '201512',
                case: '100',
                timeIn: '2015',
                payState: '2015',
                treatState: '非趸交',
                ssq: '12',
                ifCheck: false
            }, {
                type: '4453810822',
                place: '201412',
                case: '100',
                timeIn: '2014',
                payState: '2014',
                treatState: '非趸交',
                ssq: '12',
                ifCheck: false
            }, {
                type: '4453810822',
                place: '201312',
                case: '100',
                timeIn: '2013',
                payState: '2013',
                treatState: '非趸交',
                ssq: '12',
                ifCheck: false
            }, {
                type: '4453810822',
                place: '201212',
                case: '100',
                timeIn: '2012',
                payState: '2012',
                treatState: '非趸交',
                ssq: '12',
                ifCheck: false
            }]
        }
    ];
    ginseng_data9 = [{
            id: 203,
            typeList: [{
                type: '待遇已一次性结清',
                place: '94',
                case: '100',
                timeIn: '2018',
                payState: '2018',
                treatState: '非趸交',
                ssq: '12',
                ifCheck: false
            }]
        },
        {
            id: 204,
            typeList: [{
                type: '待遇已一次性结清',
                place: '94',
                case: '100',
                timeIn: '2018',
                payState: '2018',
                treatState: '非趸交',
                ssq: '12',
                ifCheck: false
            }]
        }
    ];
    pay_data = [{
            id: 203,
            typeList: [{
                type: '城镇企业职工养老保险',
                place: '天河区车坡街',
                case: '已参保',
                timeIn: '5000',
                payState: '1250',
                treatState: '600',
                dt: "2018-12-02",
                ifCheck: false
            }, {
                type: '机关事业单位养老保险',
                place: '天河区车坡街',
                case: '已参保',
                timeIn: '4300',
                payState: '1050',
                treatState: '500',
                dt: "2018-12-02",
                ifCheck: false
            }, {
                type: '城乡居民养老保险',
                place: '天河区美好社区',
                case: '已参保',
                timeIn: '3000',
                payState: '750',
                treatState: '300',
                dt: "2018-12-02",
                ifCheck: false
            }, {
                type: '城镇职工基本医疗保险',
                place: '天河区美好社区',
                case: '已参保',
                timeIn: '8000',
                payState: '2250',
                treatState: '1000',
                dt: "2018-12-02",
                ifCheck: false
            }, {
                type: '城镇居民医疗保险',
                place: '天河区车坡街',
                case: '已参保',
                timeIn: '10000',
                payState: '3250',
                treatState: '2000',
                dt: "2018-12-02",
                ifCheck: false
            }, {
                type: '新型农村合作医疗保险',
                place: '天河区车坡街',
                case: '未参保',
                timeIn: '0',
                payState: '0',
                treatState: '0',
                dt: "2018-12-02",
                ifCheck: false
            }, {
                type: '领取退（离）休金保险',
                place: '天河区车坡街',
                case: '未参保',
                timeIn: '0',
                payState: '0',
                treatState: '0',
                dt: "2018-12-02",
                ifCheck: false
            }]
        },
        {
            id: 204,
            typeList: [{
                type: '城镇企业职工养老保险',
                place: '天河区车坡街',
                case: '已参保',
                timeIn: '5000',
                payState: '1250',
                treatState: '600',
                ifCheck: true
            }, {
                type: '机关事业单位养老保险',
                place: '天河区车坡街',
                case: '已参保',
                timeIn: '5000',
                payState: '1250',
                treatState: '600',
                ifCheck: true
            }, {
                type: '城乡居民养老保险',
                place: '天河区美好社区',
                case: '已参保',
                timeIn: '5000',
                payState: '1250',
                treatState: '600',
                ifCheck: true
            }, {
                type: '城镇职工基本医疗保险',
                place: '',
                case: '已参保',
                timeIn: '5000',
                payState: '1250',
                treatState: '600',
                ifCheck: false
            }, {
                type: '城镇居民医疗保险',
                place: '',
                case: '已参保',
                timeIn: '5000',
                payState: '1250',
                treatState: '600',
                ifCheck: true
            }, {
                type: '新型农村合作医疗保险',
                place: '',
                case: '已参保',
                timeIn: '5000',
                payState: '1250',
                treatState: '600',
                ifCheck: false
            }, {
                type: '领取退（离）休金保险',
                place: '',
                case: '未参保',
                timeIn: '0',
                payState: '0',
                treatState: '0',
                ifCheck: true
            }]
        }
    ];
    //表格初始化
    var personal_table = $("#info_table").DataTable({
        searching: false,
        ordering: false,
        lengthChange: false,
        //国际化
        language: {
            search: "在表格中搜索:",
            "sInfo": "显示第 _START_ 至 _END_ 项结果，共 _TOTAL_ 项",
            "oPaginate": {
                "sFirst": "首页",
                "sPrevious": "上页",
                "sNext": "下页",
                "sLast": "末页"
            }
        },
        columns: [
            { data: 'sysCode' },
            { data: 'name' },
            { data: 'idenifyCode' },
            { data: 'town' },
            { data: 'village' },
            { data: 'zgJoinState' },
            { data: 'cxJoinState' },
            { data: 'czJoinState' },
            { data: 'czJoinState2' },
            { data: 'residence' },
            { data: 'poorProper' }
            // { data: 'survival' },
            /*{
                data: 'id',
                render: function(data, type, row, meta) {
                    return "<button class='layui-btn layui-btn-normal disaccord' value='" + data + "'>查看详情</button>";
                }
            }*/
        ],
        data: infomation_data,
        //导出
        dom: 'Bfrtip',
        buttons: [
            { extend: 'excel', text: '导出为EXCEL', title: title },
            { extend: 'csv', text: '导出为csv', title: title },
            { extend: 'print', text: '打印', title: title }
        ]
    });
    //查看详情
    //var ginsengTable = null;

    function openginsengDetail() {
        $(".disaccord").on("click", function() {
            var data_index = $(this).attr("value");

            //清空输入框、下拉框的值
            layerIdentity.val("");
            layerUserName.val("");
            /*layerEmplo.val("");
             layerWorkP.val("");
             layerSex.val("");
             layerPerIden.val("");
             layerCity.val("");
             layerCommu.val("");
             layerResiden.val("");
             layerLoca.val("");
             layerTell.val("");
             layerTele.val("");
             layerReason.val("");
             layerSurState.val("");
             layerMark.val("");
             layerDiff.val("");*/
            //清空输入框、下拉框的值
            layerIdentity.html("");
            layerUserName.html("");
            layerEmplo.html("");
            layerWorkP.html("");
            layerSex.html("");

            layerIDType.html("");
            layerNation.html("");
            layerBirthDay.html("");
            layerAdminCode.html("");
            layerHouseNum.html("");
            layerFamilyNum.html("");
            layerZgPayState.html("");
            layerGsPayState.html("");
            layerBirthPayState.html("");
            layerZgylPayState.html("");
            layerUnemploPayState.html("");
            layerJmylPayState.html("");
            layerYmylPayState.html("");
            layerJgPayState.html("");
            layerRetireFlag.html("");
            layerIssuingFlag.html("");
            layerUninsuredFlag.html("");
            layerTurnFlag.html("");

            layerPerIden.html("");
            layerCity.html("");
            layerCommu.html("");
            layerResiden.html("");
            layerLoca.html("");
            layerTell.html("");
            layerTele.html("");
            layerReason.html("");
            layerSurState.html("");
            layerMark.html("");
            layerDiff.val("");
            minzu.html("");
            hukou.html("");
            wenhua.html("");
            mingcheng.html("");
            bianhao.html("");
            zhiwu.html("");
            shijian.html("");
            gongling.html("");
            zhongxin.html("");
            zhanghao.html("");
            diqu.html("");
            youzheng.html("");
            tongxun.html("");
            /*employddLength = selectOptionLen(layerEmplo);
             employIn = selectInputObject(layerEmplo);
             sexLength = selectOptionLen(layerSex);
             sexIn = selectInputObject(layerSex);
             perIdenLength = selectOptionLen(layerPerIden);
             perIdenIn = selectInputObject(layerPerIden);
             cityLenth = selectOptionLen(layerCity);
             cityIn = selectInputObject(layerCity);
             commuLength = selectOptionLen(layerCommu);
             commuIn = selectInputObject(layerCommu);
             reasonLength = selectOptionLen(layerReason);
             reasonIn = selectInputObject(layerReason);
             surLength = selectOptionLen(layerSurState);
             surIn = selectInputObject(layerSurState);
             diffLength = selectOptionLen(layerDiff);
             diffIn = selectInputObject(layerDiff);*/
            //遍历取数
            $.each(infomation_data, function(index, item) {
                if (data_index == item.id) {
                    layerIdentity.html(item.idenifyCode);
                    layerUserName.html(item.name);
                    layerEmplo.html(item.employState);
                    layerWorkP.html(item.workPosition);
                    layerPerIden.html(item.persionIden);
                    layerSex.html(item.sex);

                    layerIDType.html('');
                    layerNation.html('');
                    layerBirthDay.html('');
                    layerAdminCode.html('');
                    layerHouseNum.html('');
                    layerFamilyNum.html('');
                    layerZgPayState.html(item.zgPayState);
                    layerGsPayState.html(item.gsPayState);
                    layerBirthPayState.html(item.birthPayState);
                    layerZgylPayState.html(item.zgylPayState);
                    layerUnemploPayState.html(item.unemploPayState);
                    layerJmylPayState.html(item.jmylPayState);
                    layerYmylPayState.html(item.ymylPayState);
                    layerJgPayState.html(item.jgPayState);
                    layerRetireFlag.html('');
                    layerIssuingFlag.html('');
                    layerUninsuredFlag.html('');
                    layerTurnFlag.html('');

                    layerCity.html(item.address);
                    layerCommu.html(item.village);
                    layerResiden.html(item.residence);
                    layerLoca.html(item.location);
                    layerTell.html(item.tell);
                    layerTele.html(item.telephone);
                    layerReason.html(item.noJoinReasion);
                    layerSurState.html(item.survival);
                    layerMark.html(item.remark);
                    layerDiff.html(item.diffJoin);
                    minzu.html(item.minzu);
                    hukou.html(item.hukou);
                    wenhua.html(item.wenhua);
                    mingcheng.html(item.mingcheng);
                    bianhao.html(item.bianhao);
                    zhiwu.html(item.zhiwu);
                    shijian.html(item.shijian);
                    gongling.html(item.gongling);
                    zhongxin.html(item.zhongxin);
                    zhanghao.html(item.zhanghao);
                    diqu.html(item.diqu);
                    youzheng.html(item.youzheng);
                    tongxun.html(item.tongxun);
                    /*for (var i = 0; i < employddLength.length; i++) {
                     if ($(employddLength[i]).text() == item.employState) {
                     $(employIn).val(item.employState);
                     break;
                     }
                     }
                     layerWorkP.val(item.workPosition);
                     for (var i = 0; i < perIdenLength.length; i++) {
                     if ($(perIdenLength[i]).text() == item.persionIden) {
                     $(perIdenIn).val(item.persionIden);
                     break;
                     }
                     }
                     for (var i = 0; i < sexLength.length; i++) {
                     if ($(sexLength[i]).text() == item.sex) {
                     $(sexIn).val(item.sex);
                     break;
                     }
                     }
                     for (var i = 0; i < cityLenth.length; i++) {
                     if ($(cityLenth[i]).text() == item.address) {
                     $(cityIn).val(item.address);
                     break;
                     }
                     }
                     for (var i = 0; i < commuLength.length; i++) {
                     if ($(commuLength[i]).text() == item.village) {
                     $(commuIn).val(item.village);
                     break;
                     }
                     }
                     layerResiden.val(item.residence);
                     layerLoca.val(item.location);
                     layerTell.val(item.tell);
                     layerTele.val(item.telephone);
                     for (var i = 0; i < reasonLength.length; i++) {
                     if ($(reasonLength[i]).text() == item.noJoinReasion) {
                     $(reasonIn).val(item.noJoinReasion);
                     break;
                     }
                     }
                     for (var i = 0; i < surLength.length; i++) {
                     if ($(surLength[i]).text() == item.survival) {
                     $(surIn).val(item.survival);
                     break;
                     }
                     }

                     layerMark.val(item.remark);
                     for (var i = 0; i < diffLength.length; i++) {
                     if ($(diffLength[i]).text() == item.diffJoin) {
                     $(diffIn).val(item.diffJoin);
                     break;
                     }
                     }*/
                    return;
                }

            });
            for (var m = 0; m < ginseng_data.length; m++) {
                if (ginseng_data[m].id == data_index) {
                    ginsengToPersion = ginseng_data[m].typeList;
                    break;
                }
            }
            for (var m = 0; m < ginseng_data2.length; m++) {
                if (ginseng_data2[m].id == data_index) {
                    ginsengToPersion2 = ginseng_data2[m].typeList;
                    break;
                }
            }
            for (var m = 0; m < ginseng_data3.length; m++) {
                if (ginseng_data3[m].id == data_index) {
                    ginsengToPersion3 = ginseng_data3[m].typeList;
                    break;
                }
            }
            for (var m = 0; m < ginseng_data4.length; m++) {
                if (ginseng_data4[m].id == data_index) {
                    ginsengToPersion4 = ginseng_data4[m].typeList;
                    break;
                }
            }
            for (var m = 0; m < ginseng_data5.length; m++) {
                if (ginseng_data5[m].id == data_index) {
                    ginsengToPersion5 = ginseng_data5[m].typeList;
                    break;
                }
            }
            for (var m = 0; m < ginseng_data6.length; m++) {
                if (ginseng_data6[m].id == data_index) {
                    ginsengToPersion6 = ginseng_data6[m].typeList;
                    break;
                }
            }
            for (var m = 0; m < ginseng_data7.length; m++) {
                if (ginseng_data7[m].id == data_index) {
                    ginsengToPersion7 = ginseng_data7[m].typeList;
                    break;
                }
            }
            for (var m = 0; m < ginseng_data8.length; m++) {
                if (ginseng_data8[m].id == data_index) {
                    ginsengToPersion8 = ginseng_data8[m].typeList;
                    break;
                }
            }
            for (var m = 0; m < ginseng_data9.length; m++) {
                if (ginseng_data9[m].id == data_index) {
                    ginsengToPersion9 = ginseng_data9[m].typeList;
                    break;
                }
            }
            /*for (var m = 0; m < pay_data.length; m++) {
                if (pay_data[m].id == data_index) {
                    ginsengToPersion2 = pay_data[m].typeList;
                    break;
                }
            }*/
            //判断稽核按钮是否显示
            var flag = false;
            for (var k = 0; k < ginsengToPersion.length; k++) {
                if (ginsengToPersion[k].ifCheck) {
                    flag = true;
                    break;
                }
            }
            if (layerSurState.html() == staticSurvivalValue && flag) {
                $(".gotoCheck").parent("p").show();
            } else {
                $(".gotoCheck").parent("p").hide();
            }
            if (ginsengTable != null) {
                ginsengTable.clear();
                ginsengTable.destroy();
            }
            //弹窗内参保情况表格初始化
            var ginsengTable = $("#layer-ginseng").DataTable({
                searching: false,
                ordering: false,
                lengthChange: false,
                info: false,
                paging: false,
                retrieve: true,
                //国际化
                language: {
                    search: "在表格中搜索:",
                    "sInfo": "显示第 _START_ 至 _END_ 项结果，共 _TOTAL_ 项",
                    "oPaginate": {
                        "sFirst": "首页",
                        "sPrevious": "上页",
                        "sNext": "下页",
                        "sLast": "末页"
                    }
                },
                columns: [
                    { data: 'type', width: '30%' },
                    { data: 'place', width: '25%' },
                    { data: 'case', width: '15%' },
                    { data: 'timeIn', width: '5%' },
                    { data: 'payState', width: '10%' },
                    { data: 'treatState', width: '15%' }
                ],
                data: ginsengToPersion,
            });
            var ginsengTable = $("#layer-ginseng2").DataTable({
                searching: false,
                ordering: false,
                lengthChange: false,
                info: false,
                paging: false,
                retrieve: true,
                //国际化
                language: {
                    search: "在表格中搜索:",
                    "sInfo": "显示第 _START_ 至 _END_ 项结果，共 _TOTAL_ 项",
                    "oPaginate": {
                        "sFirst": "首页",
                        "sPrevious": "上页",
                        "sNext": "下页",
                        "sLast": "末页"
                    }
                },
                columns: [
                    { data: 'type', width: '30%' },
                    { data: 'place', width: '25%' },
                    { data: 'case', width: '15%' },
                    { data: 'timeIn', width: '5%' },
                    { data: 'payState', width: '10%' },
                    { data: 'treatState', width: '15%' },
                    { data: 'ssq', width: '15%' }
                ],
                data: ginsengToPersion2,
            });
            var ginsengTable = $("#layer-ginseng3").DataTable({
                searching: false,
                ordering: false,
                lengthChange: false,
                info: false,
                paging: false,
                retrieve: true,
                //国际化
                language: {
                    search: "在表格中搜索:",
                    "sInfo": "显示第 _START_ 至 _END_ 项结果，共 _TOTAL_ 项",
                    "oPaginate": {
                        "sFirst": "首页",
                        "sPrevious": "上页",
                        "sNext": "下页",
                        "sLast": "末页"
                    }
                },
                columns: [
                    { data: 'type', width: '30%' },
                    { data: 'place', width: '25%' },
                    { data: 'case', width: '15%' },
                    { data: 'timeIn', width: '5%' },
                    { data: 'payState', width: '10%' },
                    { data: 'treatState', width: '15%' },
                    { data: 'ssq', width: '15%' }
                ],
                data: ginsengToPersion3,
            });
            var ginsengTable = $("#layer-ginseng4").DataTable({
                searching: false,
                ordering: false,
                lengthChange: false,
                info: false,
                paging: false,
                retrieve: true,
                //国际化
                language: {
                    search: "在表格中搜索:",
                    "sInfo": "显示第 _START_ 至 _END_ 项结果，共 _TOTAL_ 项",
                    "oPaginate": {
                        "sFirst": "首页",
                        "sPrevious": "上页",
                        "sNext": "下页",
                        "sLast": "末页"
                    }
                },
                columns: [
                    { data: 'type', width: '30%' },
                    { data: 'place', width: '25%' },
                    { data: 'case', width: '15%' },
                    { data: 'payState', width: '10%' },
                    { data: 'treatState', width: '15%' },
                    { data: 'ssq', width: '15%' }
                ],
                data: ginsengToPersion4,
            });
            var ginsengTable = $("#layer-ginseng5").DataTable({
                searching: false,
                ordering: false,
                lengthChange: false,
                info: false,
                paging: false,
                retrieve: true,
                //国际化
                language: {
                    search: "在表格中搜索:",
                    "sInfo": "显示第 _START_ 至 _END_ 项结果，共 _TOTAL_ 项",
                    "oPaginate": {
                        "sFirst": "首页",
                        "sPrevious": "上页",
                        "sNext": "下页",
                        "sLast": "末页"
                    }
                },
                columns: [
                    { data: 'type', width: '30%' },
                    { data: 'place', width: '25%' },
                    { data: 'case', width: '15%' },
                    { data: 'timeIn', width: '5%' },
                    { data: 'payState', width: '10%' },
                    { data: 'treatState', width: '15%' },
                    { data: 'ssq', width: '15%' }

                ],
                data: ginsengToPersion5,
            });
            var ginsengTable = $("#layer-ginseng6").DataTable({
                searching: false,
                ordering: false,
                lengthChange: false,
                info: false,
                paging: false,
                retrieve: true,
                //国际化
                language: {
                    search: "在表格中搜索:",
                    "sInfo": "显示第 _START_ 至 _END_ 项结果，共 _TOTAL_ 项",
                    "oPaginate": {
                        "sFirst": "首页",
                        "sPrevious": "上页",
                        "sNext": "下页",
                        "sLast": "末页"
                    }
                },
                columns: [
                    { data: 'type', width: '30%' },
                    { data: 'place', width: '25%' },
                    { data: 'case', width: '15%' },
                    { data: 'timeIn', width: '5%' },
                    { data: 'payState', width: '10%' },
                    { data: 'treatState', width: '15%' },
                    { data: 'ssq', width: '15%' }
                ],
                data: ginsengToPersion6,
            });
            var ginsengTable = $("#layer-ginseng7").DataTable({
                searching: false,
                ordering: false,
                lengthChange: false,
                info: false,
                paging: false,
                retrieve: true,
                //国际化
                language: {
                    search: "在表格中搜索:",
                    "sInfo": "显示第 _START_ 至 _END_ 项结果，共 _TOTAL_ 项",
                    "oPaginate": {
                        "sFirst": "首页",
                        "sPrevious": "上页",
                        "sNext": "下页",
                        "sLast": "末页"
                    }
                },
                columns: [
                    { data: 'type', width: '30%' },
                    { data: 'place', width: '25%' },
                    { data: 'case', width: '15%' },
                    { data: 'timeIn', width: '5%' },
                    { data: 'payState', width: '10%' },
                    { data: 'treatState', width: '15%' },
                    { data: 'ssq', width: '15%' }
                ],
                data: ginsengToPersion7,
            });
            var ginsengTable = $("#layer-ginseng8").DataTable({
                searching: false,
                ordering: false,
                lengthChange: false,
                info: false,
                paging: false,
                retrieve: true,
                //国际化
                language: {
                    search: "在表格中搜索:",
                    "sInfo": "显示第 _START_ 至 _END_ 项结果，共 _TOTAL_ 项",
                    "oPaginate": {
                        "sFirst": "首页",
                        "sPrevious": "上页",
                        "sNext": "下页",
                        "sLast": "末页"
                    }
                },
                columns: [
                    { data: 'type', width: '30%' },
                    { data: 'place', width: '25%' },
                    { data: 'case', width: '15%' },
                    { data: 'timeIn', width: '5%' },
                    { data: 'payState', width: '10%' },
                    { data: 'treatState', width: '15%' },
                    { data: 'ssq', width: '15%' }
                ],
                data: ginsengToPersion8,
            });
            var ginsengTable = $("#layer-ginseng9").DataTable({
                searching: false,
                ordering: false,
                lengthChange: false,
                info: false,
                paging: false,
                retrieve: true,
                //国际化
                language: {
                    search: "在表格中搜索:",
                    "sInfo": "显示第 _START_ 至 _END_ 项结果，共 _TOTAL_ 项",
                    "oPaginate": {
                        "sFirst": "首页",
                        "sPrevious": "上页",
                        "sNext": "下页",
                        "sLast": "末页"
                    }
                },
                columns: [
                    { data: 'sysCode' },
                    { data: 'name' },
                    { data: 'idenifyCode' },
                    { data: 'town' },
                    { data: 'village' },
                    { data: 'zgJoinState' },
                    { data: 'cxJoinState' },
                    { data: 'czJoinState' },
                    { data: 'czJoinState2' },
                    { data: 'residence' },
                    { data: 'poorProper' },
                    // { data: 'survival' },
                ],
                data: ginsengToPersion9,
            });
            checkPopLayer = layer.open({
                type: 1,
                content: $("#layer-check-pop"),
                area: ['1000px', '550px'],
                title: '查看',
                maxmin: true,
                cancel: function() {
                    //销毁表格对象
                    if (ginsengTable != null) {
                        ginsengTable.clear();
                        ginsengTable.destroy();
                    }
                }
            });
        });
    };
    //去稽核--跳转到稽核/死亡人员页面
    $("#gotoCheck").on("click", function() {
        layer.close(checkPopLayer);
        var $this = $(this);
        //字符串转化为json
        var options = new Function("return " + $this.attr('data-options'))();
        //调用父窗口的 openIframe方法
        console.log(layerIdentity.html());
        console.log("options" + options);
        parent.window.openIframe(options);
        if (layerIdentity.html() != "") {
            sessionStorage.setItem("identity", layerIdentity.html());
        }
    });

    //定义父级方法
    function childFrameFromParent() {
        console.log(1333);
    };
    layui.use(['jquery', 'form', 'table', 'element'], function() {
        var form = layui.form,
            element = layui.element,
            layer = layui.layer,
            table = layui.table,
            $ = layui.jquery;
        //自定义验证规则
        form
            .verify({
                username: function(value, item) { //value：表单的值、item：表单的DOM对象
                    if (!new RegExp("/[@#\$%\^&\*]+/g").test(value)) {
                        return '用户名不能有特殊字符';
                    }
                    if (/(^\_)|(\__)|(\_+$)/.test(value)) {
                        return '用户名首尾不能出现下划线\'_\'';
                    }
                    if (/^\d+\d+\d$/.test(value)) {
                        return '用户名不能全为数字';
                    }
                },

                identity: [/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/, '请输入有效的证件号'],
                city: function(value) {

                }
            });
        //监听提交
        form.on('submit(demo1)', function(Formdata) {
            var indexLoad = layer.load();
            var current_Index = $(this).value;

            var submitData = Formdata.field;
            search_info_data = []; //每次查询先清空上一次查询的结果
            if (submitData.city || submitData.village || submitData.identity || submitData.username || submitData.employment ||
                submitData.survivalState || submitData.participate) {
                isSearchAll = false;
            } else {
                isSearchAll = true;
            }
            //销毁表格对象
            if (personal_table != null) {
                personal_table.clear();
                personal_table.destroy();
            }
            //初始化表格
            $.each(infomation_data, function(index, item) {
                if (submitData.identity && submitData.identity == item.idenifyCode && submitData.survivalState == "") {
                    search_info_data.push(item);
                    //console.log("数据加载好了");
                } else if (submitData.identity == "" && submitData.survivalState && submitData.survivalState == item.survival) {
                    search_info_data.push(item);
                } else if (submitData.identity == item.idenifyCode && submitData.survivalState == item.survival) {
                    search_info_data.push(item);
                }
            });
            personal_table = $("#info_table").DataTable({
                searching: false,
                ordering: false,
                lengthChange: false,
                //国际化
                language: {
                    search: "在表格中搜索:",
                    "sInfo": "显示第 _START_ 至 _END_ 项结果，共 _TOTAL_ 项",
                    "oPaginate": {
                        "sFirst": "首页",
                        "sPrevious": "上页",
                        "sNext": "下页",
                        "sLast": "末页"
                    }
                },
                columns: [
                    { data: 'sysCode' },
                    { data: 'name' },
                    { data: 'idenifyCode' },
                    { data: 'town' },
                    { data: 'village' },
                    { data: 'zgJoinState' },
                    { data: 'cxJoinState' },
                    { data: 'czJoinState' },
                    { data: 'czJoinState2' },
                    { data: 'residence' },
                    { data: 'poorProper' }
                    // { data: 'survival' },
                   /* {
                        data: 'id',
                        render: function(data, type, row, meta) {
                            return "<button class='layui-btn layui-btn-normal disaccord' value='" + data + "'>查看详情</button>";
                        }
                    }*/
                ],
                data: isSearchAll ? infomation_data : search_info_data,
                //导出
                dom: 'Bfrtip',
                buttons: [
                    { extend: 'excel', text: '导出为EXCEL', title: title },
                    { extend: 'csv', text: '导出为csv', title: title },
                    { extend: 'print', text: '打印', title: title }
                ]
            });
            //console.log("数据加载异常");
            openginsengDetail();
            setTimeout(function() {
                layer.close(indexLoad);
            }, 300);
            return false;
        });

    });

    function selectOptionLen(select) {
        var length = $(select).find("option");
        /*var employInput = layerEmplo.next().find("input");
         console.log(employInput);*/
        return length;
    };

    function selectInputObject(select) {
        var inputObject = $(select).next().find("input");
        return inputObject;
    };

    function initEvent() {
        initStatistics();
        openginsengDetail();
    };
    initEvent();

    //精准扶贫对象信息初始化
    function initStatistics() {
        for (var i = 0; i < statisticsData.length; i++) {
            var obj = statisticsData[i];
            var newNode = $("<div class='should-participle-body'><span class='title-city'>" +
                obj.cityName +
                "</span><span class='title-total'>" +
                obj.shouldParticiple +
                "</span><span class='title-no-par' style='color:red;font-size:16px;'>" +
                obj.notParticiple +
                "</span></div>");

            $("#statisticsDiv").append(newNode);
        }
    };
});